package edu.wit.acl.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author testjava
 * @since 2020-01-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("acl_role")
@ApiModel(value = "Role对象", description = "")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "角色id")
    @TableId(value = "parentAdminId", type = IdType.ID_WORKER_STR)
    private String parentAdminId;

    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "角色编码")
    private String roleCode;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    private Boolean isDeleted;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

    @ApiModelProperty(value = "角色类别")
    private Integer category;

    @ApiModelProperty(value = "操作人id号")
    private String operatorId;

    @ApiModelProperty(value = "操作人姓名")
    @TableField(exist = false)
    private String operator;

    @ApiModelProperty(value = "角色数量")
    @TableField(exist = false)
    @TableId(value = "rolesNum")
    private int rolesNum;

    @ApiModelProperty(value = "角色状态")
    private String status;

    @ApiModelProperty(value = "劳务公司id")
    private String companyId;

    @ApiModelProperty(value = "劳务公司name")
    @TableField(exist = false)
    private String companyName;
}
